package com.longrise.bjjt;


import android.content.Context;
import android.os.Handler;
import android.os.Looper;

import com.baidu.location.Address;
import com.longrise.LEAP.Base.Objects.EntityBean;

/**
 * @author Administrator
 * @version $Rev: 8 $
 * @time 2015-7-15 上午10:50:49
 * @des 定义一个全局的盒子.里面放置的对象, 属性, 方法都是全局可以调用
 * @updateAuthor $Author: admin $
 * @updateDate $Date: 2015-07-15 17:06:45 +0800 (星期三, 15 七月 2015) $
 * @updateDes TODO
 */
public class BaseApplication {

    private static Context mContext;
    private static Thread mMainThread;
    private static long mMainTreadId;
    private static Looper mMainLooper;
    private static Handler mHandler;

    // 平台地址
    private String serverUrl;
    // 平台地址
    private String wxServerUrl;

    private String baseServerUrl;
    // 升级地址
    private String updateUrl;
    // areaid
    private String areaid;
    // 经度
    private String longitude;
    // 纬度
    private String latitude;
    // 地址
    private String address;
    // 用户信息对象
    private EntityBean loginInfo;
    // token
    private String token;
    //快处快赔调用服务所需要用的用户名和密码
    private String kckpName;
    private String kckpPass;

    //add by huxin 获取省和市 等信息
    private Address Addressbean;

    private String defaultCityCode;

    private String cityName;


    // =======================get()/set()=========================

    public String getDefaultCityCode() {
        return defaultCityCode;
    }

    public void setDefaultCityCode(String defaultCityCode) {
        this.defaultCityCode = defaultCityCode;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getKckpName() {
        return kckpName;
    }

    public void setKckpName(String kckpName) {
        this.kckpName = kckpName;
    }

    public String getKckpPass() {
        return kckpPass;
    }

    public void setKckpPass(String kckpPass) {
        this.kckpPass = kckpPass;
    }

    public EntityBean getLoginInfo() {
        return loginInfo;
    }

    public void setLoginInfo(EntityBean loginInfo) {
        this.loginInfo = loginInfo;
    }

    public String getBaseServerUrl() {
        return baseServerUrl;
    }

    public void setBaseServerUrl(String baseServerUrl) {
        this.baseServerUrl = baseServerUrl;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    public String getWxServerUrl() {
        return wxServerUrl;
    }

    public void setWxServerUrl(String wxServerUrl) {
        this.wxServerUrl = wxServerUrl;
    }

    public static Context getmContext() {
        return mContext;
    }

    public static Thread getmMainThread() {
        return mMainThread;
    }

    public static long getmMainTreadId() {
        return mMainTreadId;
    }

    public static Looper getmMainLooper() {
        return mMainLooper;
    }

    public static Handler getmHandler() {
        return mHandler;
    }

    public String getServerUrl() {
        return serverUrl;
    }

    public String getUpdateUrl() {
        return updateUrl;
    }

    public String getAreaid() {
        return areaid;

    }

    public String getLongitude() {
        return longitude;
    }

    public String getLatitude() {
        return latitude;
    }

    public String getAddress() {
        return address;
    }

    public static void setmContext(Context mContext) {
        BaseApplication.mContext = mContext;
    }

    public static void setmMainThread(Thread mMainThread) {
        BaseApplication.mMainThread = mMainThread;
    }

    public static void setmMainTreadId(long mMainTreadId) {
        BaseApplication.mMainTreadId = mMainTreadId;
    }

    public static void setmMainLooper(Looper mMainLooper) {
        BaseApplication.mMainLooper = mMainLooper;
    }

    public static void setmHandler(Handler mHandler) {
        BaseApplication.mHandler = mHandler;
    }

    public void setServerUrl(String serverUrl) {
        this.serverUrl = serverUrl;
    }

    public void setUpdateUrl(String updateUrl) {
        this.updateUrl = updateUrl;
    }

    public void setAreaid(String areaid) {
        this.areaid = areaid;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    //add by huxin 获取省和市,等信息
    public Address getAddressbean() {
        return Addressbean;
    }

    public void setAddressbean(Address addressbean) {
        Addressbean = addressbean;
    }


    // =======================get()=========================

    public static Handler getHandler() {
        return mHandler;
    }

    public static Context getContext() {
        return mContext;
    }

    public static Thread getMainThread() {
        return mMainThread;
    }

    public static long getMainTreadId() {
        return mMainTreadId;
    }

    public static Looper getMainThreadLooper() {
        return mMainLooper;
    }

    public EntityBean getKckpRequestBean() {
        EntityBean bean = new EntityBean();
        bean.set("username", kckpName);
        bean.set("password", kckpPass);
        return bean;
    }
}
